<div class="layui-body">
    <!-- 主体区域开始 -->
    <!--当前位置开始-->
    <div class="layui-card layadmin-header">
        <span class="layui-breadcrumb">
            <a href="{:url('Index/index')}">系统</a>
            <a href="{:url('Nav/index')}">导航管理</a>
            <a><cite>修改</cite></a>
        </span>
    </div>
    <!--当前位置结束-->
    <div class="layui-row">
        <div id="head">
            <div class="layui-row">
                <div class="layui-col-md2 layui-col-md-offset10" id="head-right">
                    <a href="{:url('Nav/index')}" class="layui-btn layui-btn-normal" title="返回列表">返回列表</a>
                </div>
            </div>
        </div>
        <div id="main">
            <form class="layui-form" action="" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" value="{$data.title}" required lay-verify="required"
                               placeholder="请输入名称"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">关键字</label>
                    <div class="layui-input-block">
                        <input type="text" name="keywords" value="{$data.keywords}" placeholder="请输入关键字"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">描述</label>
                    <div class="layui-input-block">
                        <textarea name="represent" class="layui-textarea" placeholder="请输入描述内容">{$data.represent}</textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">序号</label>
                    <div class="layui-input-block">
                        <input type="number" name="num" value="{$data.num}" required lay-verify="required"
                               placeholder="请输入序号"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">显示</label>
                    <div class="layui-input-block">
                        <input type="radio" name="status" value="1" title="显示" required lay-verify="required" {$data.status == 1 ?="checked"}>
                        <input type="radio" name="status" value="2" title="隐藏" required lay-verify="required" {$data.status == 2 ?="checked"}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">类型</label>
                    <div class="layui-input-block">
                        <input type="radio" name="type" value="0" lay-filter="nav" title="栏目" required lay-verify="required" {$data.type == 0 ?="checked"}>
                        <input type="radio" name="type" value="1" lay-filter="nav" title="单页" required lay-verify="required" {$data.type == 1 ?="checked"}>
                        <input type="radio" name="type" value="2" lay-filter="nav" title="链接" required lay-verify="required" {$data.type == 2 ?="checked"}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">路径</label>
                    <div class="layui-input-block">
                        <input type="url" name="path" value="{$data.path}" required lay-verify="required"
                               placeholder="请输入路径"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item {$data.type == 1 ? '' : 'ueditorStatus'}" id="ueditor">
                    <label class="layui-form-label">单页内容</label>
                    <div class="layui-input-block">
                        <!-- 加载编辑器的容器 -->
                        <textarea name="content" id="container" lay-reqText="请输入内容"  style="width: 730px;height: 600px;">{$data.content|raw}</textarea>
                        <!-- 配置文件 -->
                        <script type="text/javascript" src="/ph/ueditor/ueditor.config.js"></script>
                        <!-- 编辑器源码文件 -->
                        <script type="text/javascript" src="/ph/ueditor/ueditor.all.js"></script>
                        <!-- 实例化编辑器 -->
                        <script type="text/javascript">var ue1 = UE.getEditor('container');</script>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input type="hidden" name="request_url" value="{:url('Nav/data_save')}">
                        <input type="hidden" name="id" value="{$data.id}">
                        <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!--主体区域结束-->
</div>